/**
 * log4j 2的实现，读取配置log4j2.xml
 *
 * @Author gucb
 * @Date 2017/6/14.
 */
public class Log4jDemo {

  protected static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager
      .getLogger(Log4jDemo.class);

  public static void main(String[] args) {
    log.info("hello world");
    log.error("如果没有配置文件，默认只打印ERROR日志");
  }
}
